<template>
	<view class="content">
		<view class="brand-lsits">
			<view class="header-text">
				<view class="line"></view> 热改楼盘
			</view>
			<view class="brand-image-list">
				<view class="view-imaga-list" v-for="(item,index) in BrandList" :key="index">
					<view class="view_text">
						<view class="view_text_one">{{item.name}}</view>
						<view class="view_text_two">{{item.desc_str}}</view>
					</view>
					<image class="image-list" :src="item.thumb">
					</image>
				</view>
			</view>
		</view>
		<view class="information">
			<view class="header-text">
				<view class="line"></view> 楼盘套餐
			</view>
		</view>
		<view class="setmeal-row-image">
			<view class="setmeal-image-list" v-for="(item,index) in ComboList">
				<image class="setmeal-image" :src="item.thumb">
				</image>
				<view class="setmeal-image-details">
					<view class="image-details-1">{{item.name}}</view>
					<view class="image-details-textview">
						<text class="image-details-2">{{item.model}}m²</text>
						<text class="image-details-3">{{item.price}}</text>
					</view>
					<view class="image-details-4">{{item.desc_str}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				BrandList: [],
				ComboList: [],
				pages: {
					"page": 1, //页码
					"limit": 10 //分页偏移量
				}
			}
		},
		methods: {
			getBrandList() {
				this.$http.post('/system/getBrandList').then(res => {
					this.BrandList = res.data.data
				})
			},
			getComboList() {
				this.$http.post('/system/getComboList', this.pages).then(res => {
					this.ComboList = res.data.data.list
					this.pages.page = res.data.data.page
					this.pages.limit = res.data.data.limit
					console.log(this.ComboList);
				})
			}
		},
		onLoad() {
			this.getBrandList()
			this.getComboList()
		}
	}
</script>

<style lang="scss" scoped>
	.information {
		margin-top: 40rpx;
		margin-left: 20rpx;
		margin-right: 40rpx;
		box-sizing: border-box;
		justify-content: space-between;
		display: flex;

		.header-text {
			font-size: 28rpx;
			font-weight: 700;
			color: #333333;
			line-height: 28rpx;
			display: flex;
			align-items: center;

			.line {
				width: 6rpx;
				height: 28rpx;
				background: #3d9c36;
				margin-right: 20rpx;
			}
		}
	}


	.content {
		width: 100vw;
		height: 100vh;
		background-color: #F5F5F5;
		box-sizing: border-box; //盒子模型

		.brand-lsits {
			width: 750rpx;
			height: 284rpx;
			background: #ffffff;
			box-sizing: border-box;
			padding-left: 30rpx;
			padding-top: 34rpx;
			padding-bottom: 28px;

			.brand-image-list {
				box-sizing: border-box;
				overflow-x: scroll;
				margin-top: 20rpx;
				display: flex;

				.view-imaga-list {
					margin-right: 20rpx;
					width: 280rpx;
					height: 168rpx;
					position: relative;

					.image-list {
						width: 280rpx;
						height: 168rpx;
					}

					.view_text {
						position: absolute;
						background: rgba(0, 0, 0, .1);
						z-index: 3;
						width: 280rpx;
						height: 168rpx;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
					}

					.view_text_one {
						z-index: 2;
						color: #ffffff;

					}

					.view_text_two {
						z-index: 2;
						color: #ffffff;
						font-size: 20rpx;
					}
				}
			}
		}



		.setmeal-row-image {
			// box-sizing: border-box;
			// overflow-x: scroll;
			margin-top: 20rpx;
			display: flex;
			flex-direction: row;
			justify-content: center;
			align-items: center;

			.setmeal-image-list {
				margin-left: 40rpx;
				margin-right: 20rpx;
				position: relative;

				.setmeal-image {
					width: 316rpx;
					height: 420rpx;
					background: rgba(0, 0, 0, 0.50);
					border-radius: 12rpx 12rpx 0rpx 0rpx;
				}

				.setmeal-image-details {
					width: 316rpx;
					height: 164rpx;
					margin-top: -10rpx;
					background: #ffffff;
					border-radius: 0rpx 0rpx 12rpx 12rpx;
					position: relative;
					bottom: 5rpx;

					.image-details-1 {
						padding-top: 10rpx;
						font-size: 24rpx;
						font-weight: 500;
						color: #333333;
						line-height: 24rpx;
					}

					.image-details-textview {
						box-sizing: border-box;
						justify-content: space-between;
						align-items: center;
						display: flex;

						.image-details-3::before {
							content: "￥";
							font-size: 20rpx;
							font-weight: 700;
							color: #e54040;
							line-height: 20rpx;
						}

						.image-details-3 {
							font-size: 32rpx;
							font-weight: 700;
							text-align: CENTER;
							color: #e54040;
							line-height: 32rpx;
						}
					}

					.image-details-4 {
						padding-top: 10rpx;
						font-size: 20rpx;
						text-align: LEFT;
						line-height: 30rpx;
					}
				}
			}
		}
	}
</style>
